//
// Copyright (c) 2011 Alex Nesterenko
//


#ifndef NANE_X11INPUTSYSTEM_H
#   define  NANE_X11INPUTSYSTEM_H

#   include "nane/InputSystem/IInputSystem.h"
#   include <X11/Xlib.h>
#   include <map>

namespace nane
{
    class X11InputSystem
        : public IInputSystem
    {
    public:
        X11InputSystem();
        ~X11InputSystem();

    public:
        bool initialize();
        void shutdown();
        bool initializeContext( IWindow::OSHandle _windowHandle );
        void shutdownContext();
        void update( IKeyboardInputHandler* _handler );

    private:
        Display* m_display;
        Window m_hWindow;

        typedef std::map<KeySym, EKeyCode::raw_type> TKeyCodeMap;
        TKeyCodeMap m_XToKeyCodeMap;
    };
}

#endif	// NANE_X11INPUTSYSTEM_H
